                <fieldset class="addMedia"><legend>Add Image</legend>
                   <?php echo $form->create('Media',array('url'=>$html->url(null,true),'type'=>'file')) ?>
                   
                   <?php //echo $form->input('title',array('class'=>'bigfield')) ?>
                   <?php //echo $form->input('description',array('style'=>'height:35px')) ?>
                   <?php //echo $form->input('meta_key') ?>
                   
                   <?php echo $form->input('file_media',array('type'=>'file',"label"=>"Image File")) ?>
                   <?php echo $form->input('link',array('type'=>'text',"label"=>"Link")) ?>
                   <?php echo $form->input('type',array('type'=>'hidden',"value"=>"$media_type")) ?>
                   <?php echo $form->input('foreign_key_id',array('type'=>'hidden',"value"=>"$foreign_key_id")) ?>
                   <?php 
                   
                   if(isset($this->data["Media"]["id"])): ?>
                        <?php echo $form->input("id",array("type"=>"hidden")) ?>
                        <?php echo $html->image("uploads/".$this->data["Media"]["file_media"],array("width"=>"300")) ?>
                   <?php endif ?>
                   <?php /* //echo $form->input('meta_description',array('label'=>'Youtube Embeded Code','style'=>'height:35px')) ?>
                   <div class="media_box" style="width: 500px;">
                       <?php echo $form->input('file_thumbnail',array('type'=>'file','label'=>'Thumbnail')) ?>    
                       <?php echo $form->input('resize',array('label'=>'Resize For','value'=>'335x220','options'=>array(
                       '230x230'=>"Highlights 1 (230x230)",
                       '230x115'=>"Highlights 2 (230x115)",
                       '335x220'=>"Picture Gallery (335x220)",
                       
                       
                       ))) ?>
                   </div>
                   
                   <?php */ //echo $form->input('gallery_id',array('type'=>'hidden','value'=>$gallery['Gallery']['id'])) ?>
                   
                    <div class="input no_margin_bottom">
                        <span class="btn"><input type="submit" value="Upload" /></span>
                        <?php if(isset($this->data["Media"]["id"])): ?>
                        <a class="btn ml10" href="<?php echo $html->url(array('controller'=>'media','action'=>'index',$media_type,$foreign_key_id)) ?>"><b>Cancel</b></a>    
                        <?php endif ?>
                    </div>
                    
                            
                   <?php echo $form->end() ?>
                </fieldset>
                
                